Optimal. Leaf size=427 \[ -\frac {i (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(e h-d i) (g h-f i) (h+i x)}+\frac {g \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e (f+g x)}{e f-d g}\right )}{(g h-f i)^2}+\frac {2 b e n \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (h+i x)}{e h-d i}\right )}{(e h-d i) (g h-f i)}-\frac {g \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e (h+i x)}{e h-d i}\right )}{(g h-f i)^2}+\frac {2 b g n \left (a+b \log \left (c (d+e x)^n\right )\right ) \text {Li}_2\left (-\frac {g (d+e x)}{e f-d g}\right )}{(g h-f i)^2}+\frac {2 b^2 e n^2 \text {Li}_2\left (-\frac {i (d+e x)}{e h-d i}\right )}{(e h-d i) (g h-f i)}-\frac {2 b g n \left (a+b \log \left (c (d+e x)^n\right )\right ) \text {Li}_2\left (-\frac {i (d+e x)}{e h-d i}\right )}{(g h-f i)^2}-\frac {2 b^2 g n^2 \text {Li}_3\left (-\frac {g (d+e x)}{e f-d g}\right )}{(g h-f i)^2}+\frac {2 b^2 g n^2 \text {Li}_3\left (-\frac {i (d+e x)}{e h-d i}\right )}{(g h-f i)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.34, antiderivative size = 427, normalized size of antiderivative = 1.00, number of steps
used = 14, number of rules used = 9, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.290, Rules used = {2465, 2443,
2481, 2421, 6724, 2444, 2441, 2440, 2438} \begin {gather*} \frac {2 b g n \text {PolyLog}\left (2,-\frac {g (d+e x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(g h-f i)^2}-\frac {2 b g n \text {PolyLog}\left (2,-\frac {i (d+e x)}{e h-d i}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(g h-f i)^2}+\frac {2 b^2 e n^2 \text {PolyLog}\left (2,-\frac {i (d+e x)}{e h-d i}\right )}{(e h-d i) (g h-f i)}-\frac {2 b^2 g n^2 \text {PolyLog}\left (3,-\frac {g (d+e x)}{e f-d g}\right )}{(g h-f i)^2}+\frac {2 b^2 g n^2 \text {PolyLog}\left (3,-\frac {i (d+e x)}{e h-d i}\right )}{(g h-f i)^2}+\frac {2 b e n \log \left (\frac {e (h+i x)}{e h-d i}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(e h-d i) (g h-f i)}-\frac {i (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(h+i x) (e h-d i) (g h-f i)}+\frac {g \log \left (\frac {e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(g h-f i)^2}-\frac {g \log \left (\frac {e (h+i x)}{e h-d i}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(g h-f i)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2421
Rule 2438
Rule 2440
Rule 2441
Rule 2443
Rule 2444
Rule 2465
Rule 2481
Rule 6724
Rubi steps
\begin {align*} \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(h+228 x)^2 (f+g x)} \, dx &=\int \left (\frac {228 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(228 f-g h) (h+228 x)^2}-\frac {228 g \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(228 f-g h)^2 (h+228 x)}+\frac {g^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(228 f-g h)^2 (f+g x)}\right ) \, dx\\ &=-\frac {(228 g) \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{h+228 x} \, dx}{(228 f-g h)^2}+\frac {g^2 \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{f+g x} \, dx}{(228 f-g h)^2}+\frac {228 \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(h+228 x)^2} \, dx}{228 f-g h}\\ &=-\frac {228 (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(228 d-e h) (228 f-g h) (h+228 x)}-\frac {g \log \left (-\frac {e (h+228 x)}{228 d-e h}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(228 f-g h)^2}+\frac {g \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e (f+g x)}{e f-d g}\right )}{(228 f-g h)^2}+\frac {(2 b e g n) \int \frac {\log \left (\frac {e (h+228 x)}{-228 d+e h}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{d+e x} \, dx}{(228 f-g h)^2}-\frac {(2 b e g n) \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )}{d+e x} \, dx}{(228 f-g h)^2}+\frac {(456 b e n) \int \frac {a+b \log \left (c (d+e x)^n\right )}{h+228 x} \, dx}{(228 d-e h) (228 f-g h)}\\ &=\frac {2 b e n \log \left (-\frac {e (h+228 x)}{228 d-e h}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(228 d-e h) (228 f-g h)}-\frac {228 (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(228 d-e h) (228 f-g h) (h+228 x)}-\frac {g \log \left (-\frac {e (h+228 x)}{228 d-e h}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(228 f-g h)^2}+\frac {g \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e (f+g x)}{e f-d g}\right )}{(228 f-g h)^2}+\frac {(2 b g n) \text {Subst}\left (\int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (\frac {e \left (\frac {-228 d+e h}{e}+\frac {228 x}{e}\right )}{-228 d+e h}\right )}{x} \, dx,x,d+e x\right )}{(228 f-g h)^2}-\frac {(2 b g n) \text {Subst}\left (\int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (\frac {e \left (\frac {e f-d g}{e}+\frac {g x}{e}\right )}{e f-d g}\right )}{x} \, dx,x,d+e x\right )}{(228 f-g h)^2}-\frac {\left (2 b^2 e^2 n^2\right ) \int \frac {\log \left (\frac {e (h+228 x)}{-228 d+e h}\right )}{d+e x} \, dx}{(228 d-e h) (228 f-g h)}\\ &=\frac {2 b e n \log \left (-\frac {e (h+228 x)}{228 d-e h}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(228 d-e h) (228 f-g h)}-\frac {228 (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(228 d-e h) (228 f-g h) (h+228 x)}-\frac {g \log \left (-\frac {e (h+228 x)}{228 d-e h}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(228 f-g h)^2}+\frac {g \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e (f+g x)}{e f-d g}\right )}{(228 f-g h)^2}+\frac {2 b g n \left (a+b \log \left (c (d+e x)^n\right )\right ) \text {Li}_2\left (-\frac {g (d+e x)}{e f-d g}\right )}{(228 f-g h)^2}-\frac {2 b g n \left (a+b \log \left (c (d+e x)^n\right )\right ) \text {Li}_2\left (\frac {228 (d+e x)}{228 d-e h}\right )}{(228 f-g h)^2}-\frac {\left (2 b^2 g n^2\right ) \text {Subst}\left (\int \frac {\text {Li}_2\left (-\frac {g x}{e f-d g}\right )}{x} \, dx,x,d+e x\right )}{(228 f-g h)^2}+\frac {\left (2 b^2 g n^2\right ) \text {Subst}\left (\int \frac {\text {Li}_2\left (-\frac {228 x}{-228 d+e h}\right )}{x} \, dx,x,d+e x\right )}{(228 f-g h)^2}-\frac {\left (2 b^2 e n^2\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {228 x}{-228 d+e h}\right )}{x} \, dx,x,d+e x\right )}{(228 d-e h) (228 f-g h)}\\ &=\frac {2 b e n \log \left (-\frac {e (h+228 x)}{228 d-e h}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{(228 d-e h) (228 f-g h)}-\frac {228 (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(228 d-e h) (228 f-g h) (h+228 x)}-\frac {g \log \left (-\frac {e (h+228 x)}{228 d-e h}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(228 f-g h)^2}+\frac {g \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e (f+g x)}{e f-d g}\right )}{(228 f-g h)^2}+\frac {2 b g n \left (a+b \log \left (c (d+e x)^n\right )\right ) \text {Li}_2\left (-\frac {g (d+e x)}{e f-d g}\right )}{(228 f-g h)^2}+\frac {2 b^2 e n^2 \text {Li}_2\left (\frac {228 (d+e x)}{228 d-e h}\right )}{(228 d-e h) (228 f-g h)}-\frac {2 b g n \left (a+b \log \left (c (d+e x)^n\right )\right ) \text {Li}_2\left (\frac {228 (d+e x)}{228 d-e h}\right )}{(228 f-g h)^2}-\frac {2 b^2 g n^2 \text {Li}_3\left (-\frac {g (d+e x)}{e f-d g}\right )}{(228 f-g h)^2}+\frac {2 b^2 g n^2 \text {Li}_3\left (\frac {228 (d+e x)}{228 d-e h}\right )}{(228 f-g h)^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.41, size = 630, normalized size = 1.48 \begin {gather*} \frac {(e h-d i) (g h-f i) \left (a-b n \log (d+e x)+b \log \left (c (d+e x)^n\right )\right )^2+g (e h-d i) (h+i x) \left (a-b n \log (d+e x)+b \log \left (c (d+e x)^n\right )\right )^2 \log (f+g x)-g (e h-d i) (h+i x) \left (a-b n \log (d+e x)+b \log \left (c (d+e x)^n\right )\right )^2 \log (h+i x)-2 b n \left (a-b n \log (d+e x)+b \log \left (c (d+e x)^n\right )\right ) \left ((g h-f i) (i (d+e x) \log (d+e x)-e (h+i x) \log (h+i x))-g (e h-d i) (h+i x) \left (\log (d+e x) \log \left (\frac {e (f+g x)}{e f-d g}\right )+\text {Li}_2\left (\frac {g (d+e x)}{-e f+d g}\right )\right )+g (e h-d i) (h+i x) \left (\log (d+e x) \log \left (\frac {e (h+i x)}{e h-d i}\right )+\text {Li}_2\left (\frac {i (d+e x)}{-e h+d i}\right )\right )\right )-b^2 n^2 \left ((g h-f i) \left (\log (d+e x) \left (i (d+e x) \log (d+e x)-2 e (h+i x) \log \left (\frac {e (h+i x)}{e h-d i}\right )\right )-2 e (h+i x) \text {Li}_2\left (\frac {i (d+e x)}{-e h+d i}\right )\right )-g (e h-d i) (h+i x) \left (\log ^2(d+e x) \log \left (\frac {e (f+g x)}{e f-d g}\right )+2 \log (d+e x) \text {Li}_2\left (\frac {g (d+e x)}{-e f+d g}\right )-2 \text {Li}_3\left (\frac {g (d+e x)}{-e f+d g}\right )\right )+g (e h-d i) (h+i x) \left (\log ^2(d+e x) \log \left (\frac {e (h+i x)}{e h-d i}\right )+2 \log (d+e x) \text {Li}_2\left (\frac {i (d+e x)}{-e h+d i}\right )-2 \text {Li}_3\left (\frac {i (d+e x)}{-e h+d i}\right )\right )\right )}{(e h-d i) (g h-f i)^2 (h+i x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.32, size = 0, normalized size = 0.00 \[\int \frac {\left (a +b \ln \left (c \left (e x +d \right )^{n}\right )\right )^{2}}{\left (g x +f \right ) \left (i x +h \right )^{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \log {\left (c \left (d + e x\right )^{n} \right )}\right )^{2}}{\left (f + g x\right ) \left (h + i x\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (a+b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )\right )}^2}{\left (f+g\,x\right )\,{\left (h+i\,x\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________